﻿@{
    ViewBag.Title = "tin_khuyen_mai";
    Layout = "~/Views/Shared/_newLayout.cshtml";
}
<div class="center_center">
    <h2>Danh sách bài viết </h2>
    <div class="tin_tuc">
    <ul style="margin:0px;">
         @foreach (var item in Model)
            {
                <li>
                    <img src="../../Content/images/bai_viet/@item.Hinh" alt="@item.Hinh" title="@item.Hinh" width="50px" height="50px" style="display:inline-block"/> 
                    <a href="../../QuaLuuNiem/ChiTietBaiViet/@item.MaBaiViet">@item.TenBaiViet</a> <br />
                    <span style="color:#093; font-size:12px;">@item.NgayViet</span> 
                    <input type="submit" value="Chi tiết" class="button_ct" onclick="window.location.href='../../QuaLuuNiem/ChiTietBaiViet/@item.MaBaiViet'" style="float:right; " />
                </li>
            } 
    </ul>
    </div><!--end load tin tuc-->
</div><!--end noi dung-->
<div class="center_center">
    <div class="phan_trang">
         Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    of @Model.PageCount
     
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink(" << ", "bai_viet", new { page = 1, currentFilter = ViewBag.CurrentFilter})
        @Html.Raw(" ");
        @Html.ActionLink(" Prev ", "bai_viet", new { page = Model.PageNumber - 1, currentFilter = ViewBag.CurrentFilter })
    }
    else
    {
        @:Prev 
        @Html.Raw(" ");
        @:<<
    }
     
    @if (Model.HasNextPage)
    {
        @Html.ActionLink(" Next ", "bai_viet", new { page = Model.PageNumber + 1, currentFilter = ViewBag.CurrentFilter })
        @Html.Raw(" ");
        @Html.ActionLink(" >> ", "bai_viet", new { page = Model.PageCount, currentFilter = ViewBag.CurrentFilter })
    }
    else
    {
        @:Next >>
        @Html.Raw(" ")
        @:>>
    }
    </div>

    @Html.ActionLink( "Quản lý sản phẩm (Thêm Xóa Sửa)","danh_sach_bai_viet","Admin")  
    &larr;
</div><!--end noi dung-->